package com.sinping.qh.dto.admin.noticebook;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.sinping.qh.dto.base.BaseDTO;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 返回的dto,noticeStatus为String
 * @author jiahuaiqing
 * @create 2018/7/3
 */
@Data
public class NoticeBookReturnDto extends BaseDTO implements Serializable {
    private static final long serialVersionUID = -7229042411397097482L;

    /**
     * 接收单位id
     */
    @JsonProperty(value = "notice_receive_unit_id")
    private String noticeReceiveUnitId;

    /**
     * 接收单位名称
     */
    @JsonProperty(value = "notice_receive_unit_name")
    private String noticeReceiveUnitName;
    /**
     * 下发部门
     */
    @NotBlank(message = "下发部门不能为空")
    @Pattern(regexp = "^.{0,30}$", message = "下发部门不超过30个字符")
    @JsonProperty(value = "notice_send_depart")
    private String noticeSendDepart;
    /**
     * 安全主管领导
     */
    @NotNull(message = "安全主管领导不能为空")
    @Pattern(regexp = "^.{0,20}$", message = "安全主管领导不超过20个字符")
    @JsonProperty(value = "notice_leader")
    private String noticeLeader;
    /**
     * 检查情况
     */
    @NotNull(message = "检查情况不能为空")
    @Pattern(regexp = "^.{0,1000}$", message = "检查情况不超过1000个字符")
    @JsonProperty(value = "notice_check_desc")
    private String noticeCheckDesc;
    /**
     * 整改要求
     */
    @NotNull(message = "整改要求不能为空")
    @Pattern(regexp = "^.{0,1000}$", message = "整改要求不超过1000个字符")
    @JsonProperty(value = "notice_check_requirement")
    private String noticeCheckRequirement;
    /**
     * 隐患id数组  子文档
     */
    @NotNull(message = "隐患id不能为空")
    @JsonProperty(value = "hidden_danger_ids")
    private List<String> hiddenDangerIds;

    /**
     * 通知书编号
     */
    @JsonProperty(value = "notice_no")
    private String noticeNo;

    /**
     * 通知书状态
     */
    @JsonProperty(value = "notice_status")
    private String noticeStatus;

    /**
     * 通知书方案状态(通知书下发之前，方案状态为空)
     */
    @JsonProperty(value = "notice_case_status")
    private String noticeCaseStatus;
    /**
     * 查询条件：下发日期开始
     */
    @JsonProperty(value = "notice_send_date")
    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
    private Date noticeSendDate;

    /**
     * 查询条件：下发日期开始
     */
    @JsonProperty(value = "notice_send_date_start")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date noticeSendDateStart;
    /**
     * 查询条件：下发日期结束
     */
    @JsonProperty(value = "notice_send_date_end")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private Date noticeSendDateEnd;

    /**
     * 通知书附件名称
     */
    @JsonProperty(value = "notice_attach_name")
    private String noticeAttachName;
    /**
     * 通知书附件路径
     */
    @JsonProperty(value = "notice_attach_path")
    private String noticeAttachPath;
    /**
     * 通知书附件大小
     */
    @JsonProperty(value = "notice_attach_size")
    private String noticeAttachSize;
    /**
     * 创建人id
     */
    @JsonProperty(value = "create_user_id")
    private String createUserId;
    /**
     * 创建人姓名
     */
    @JsonProperty(value = "create_user_name")
    private String createUserName;

    @JsonProperty(value = "offices")
    private String offices;
}
